package com.fivetiger.controller;

import com.fivetiger.dao.RaiseDao;
import com.fivetiger.entity.Raise;
import com.fivetiger.service.inte.RaiseService;
import com.fivetiger.vo.PageBean;
import com.fivetiger.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @date 2021/6/18 - 8:31
 */
@Controller
@RequestMapping("/api/raise/")
public class RaiseController {
    @Autowired
    private RaiseService service;
    //新增宠物
    @RequestMapping("save.do")
    @ResponseBody
    public R save(Raise raise){
        return service.save(raise);
    }

    //查询宠物信息列表
    @RequestMapping("all.do")
    @ResponseBody
    public PageBean all(){
        return service.queryList();
    }
}
